<!-- MENU-LOCATION=NONE -->
<!DOCTYPE HTML SYSTEM "-//Macromedia//DWExtension layout-engine 5.0//dialog">
<html>
<head>
<title>PHP/Java CLASS Generator </title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<META NAME="ROBOTS" CONTENT="ALL">
<META NAME="CREATOR" CONTENT="GraFX Software Solutions - www.grafxsoftware.com">
</head>
<script language="JavaScript" type="text/JavaScript" >
function canAcceptCommand(){
 return(true);
};
function hexval(x){
  var hex="0123456789ABCDEF";
  var x1=((x-x%16)/16);
  var x2=x%16;
  var result=""+hex[x1]+""+hex[x2];
  return(result);
};

function cs(input){
  var result="";
  var i=0;
  for (i=0;i<input.length;i++){
  	result+="%"+hexval(input.charCodeAt(i));
  };
  return(result);
};


function isDOMRequired() {
	return false;
}

function objectTag(){
	getcode();
};

function displayHelp(){
	var helpfile=dw.getConfigurationPath()+"/objects/codegenerator4dw/codegeneratorhelp.htm"
	dw.browseDocument(helpfile);
};

function getcode(){
	var send="";

	var numedezv=cs(document.form.numedezv.value);
	var numeproiect=cs(document.form.numeproiect.value);
	var nume=cs(document.form.nume.value);
	var numevar=cs(document.form.numevar.value);
	var tipul="";
	if (document.form.tipul[0].checked) tipul="php";
		else tipul="java";
	var numecampuri=cs(document.form.numecampuri.value);
	var numefunctii=cs(document.form.numefunctii.value);
	var numebd=cs(document.form.numebd.value);

	send+="numedezv"+"="+numedezv;
	send+="&"+"numeproiect"+"="+numeproiect;
	send+="&"+"nume"+"="+nume;
	send+="&"+"numevar"+"="+numevar;
	send+="&"+"tipul"+"="+tipul;
	send+="&"+"numecampuri"+"="+numecampuri;
	send+="&"+"numefunctii"+"="+numefunctii;
	send+="&"+"numebd"+"="+numebd;
	send+="&Submit=Submit";

	var result="";
	result=MMHttp.postText("http://www.grafxsoftware.com/demo/code_generator/generate_code.php",send,"application/x-www-form-urlencoded").data;
	var filename=dreamweaver.browseForFileURL("save");

	if (filename.length<2){
		close();

		return;
	};

	//alert(filename);
	//alert(result);

	DWfile.write(filename,result);
	dreamweaver.openDocument(filename);
	close();
};

</script>

<body>
<form action="http://www.grafxsoftware.com/demo/code_generator/generate_code.php" method="post" enctype="multipart/form-data" name="form">
        <table width="483" border="0" cellpadding="3" cellspacing="3">
          <tr>
            <td><a href="http://www.grafxsoftware.com/" target="_blank"><img src="logo.png" border="0"></a></td>
            <td><div align="center"><font color="#FF0000"><strong>REQUIRES INTERNET CONNECTION</strong></font> </div></td>
          </tr>
          <tr>
            <td colspan="2">&nbsp;</td>
          </tr>
          <tr>
            <td width="28%" valign="top"><div align="right"><strong>Developer name </strong></div></td>
            <td width="72%"><input name="numedezv" type="text"></td>
          </tr>
          <tr>
            <td width="28%" valign="top"><div align="right"><strong>Project name </strong></div></td>
            <td width="72%"><input name="numeproiect" type="text"></td>
          </tr>
          <tr>
            <td valign="top"><div align="right"><strong>CLASS name </strong></div></td>
            <td><input name="nume" type="text"></td>
          </tr>
          <tr>
            <td valign="top"><div align="right"><strong>VARIABLE name </strong></div></td>
            <td><input name="numevar" type="text">              </td>
          </tr>
          <tr>
            <td valign="top"><div align="right"><strong>Type</strong></div></td>
            <td>php
              <input name="tipul" type="radio" value="php" checked>
              java
              <input type="radio" name="tipul" value="java"></td>
          </tr>
          <tr>
            <td valign="top"><div align="right"><strong>DB fields </strong></div></td>
            <td><input name="numecampuri" type="text" id="numecampuri" size="50">
              <br>            </td>
          </tr>
          <tr>
            <td valign="top"><div align="right"><strong>Functions name </strong></div></td>
            <td><input name="numefunctii" type="text" id="numefunctii" size="50">
              </td>
          </tr>
          <tr>
            <td valign="top"><div align="right"><strong>DB Table </strong></div></td>
            <td><input name="numebd" type="text" id="numebd"> </td>
          </tr>
          <tr>
            <td colspan="2"><div align="center">
             <!--   <input type="submit" name="Submit" value="Submit" onclick="getcode()"> -->
1998-2004 Copyright <a href="http://www.grafxsoftware.com/">GraFX Software Solutions </a><br>
</div></td>
          </tr>
  </table>
</form>
</body>
</html>
